/*
 * @Description: 变电安全生产接口
 * @Author: Huang Junjie
 * @Date: 2021-06-15 17:16:00
 * @LastEditTime: 2021-07-19 19:42:33
 * @LastEditors: Liu Zhiwang
 */
import request from '@/utils/request'

// 分页查询
export function getListPage(params) {
  return request({
    url: `/cdaily/fillInMainRecord/pageData`,
    method: 'get',
    params
  })
}

// 保存或更新
export function addOrEditData(data) {
  return request({
    url: `/cdaily/fillInMainRecord/saveOrUpdateData`,
    method: 'post',
    data
  })
}

// 查询其他问题信息列表
export function getOtherProblemListPage(params) {
  return request({
    url: `/cdaily/otherProblem/listData`,
    method: 'get',
    params
  })
}

// 新增/修改其他问题信息
export function addEditOtherProblemData(data) {
  return request({
    url: `/cdaily/otherProblem/saveOrUpdate`,
    method: 'post',
    data
  })
}

// 删除其他问题信息
export function deleteOtherProblemData(id) {
  return request({
    url: `/cdaily/otherProblem/${id}`,
    method: 'delete'
  })
}

// 查询接触网检修信息列表
export function getJcwRepairListPage(params) {
  return request({
    url: `/cdaily/jcwRepair/listData`,
    method: 'get',
    params
  })
}

// 新增/修改接触网检修信息
export function addEditJcwRepairData(data) {
  return request({
    url: `/cdaily/jcwRepair/saveOrUpdate`,
    method: 'post',
    data
  })
}

// 暂存接触网检修信息
export function tempSaveData(data) {
  return request({
    url: `/cdaily/jcwRepair/tempSaveData`,
    method: 'post',
    data
  })
}

// 删除接触网检修信息
export function deleteJcwRepairData(id) {
  return request({
    url: `/cdaily/jcwRepair/${id}`,
    method: 'delete'
  })
}

// 查询巡视记录信息列表
export function getMulInspectListPage(params) {
  return request({
    url: `/cdaily/mulInspect/listData`,
    method: 'get',
    params
  })
}

// 新增/修改巡视记录信息
export function addEditMulInspectData(data) {
  return request({
    url: `/cdaily/mulInspect/saveOrUpdate`,
    method: 'post',
    data
  })
}

// 删除巡视记录信息
export function deleteMulInspectData(id) {
  return request({
    url: `/cdaily/mulInspect/${id}`,
    method: 'delete'
  })
}

// 查询接触网临时计划信息列表
export function getJcwTempRepairListPage(params) {
  return request({
    url: `/cdaily/jcwTempRepair/listData`,
    method: 'get',
    params
  })
}

// 新增/修改接触网临时计划信息
export function addEditJcwTempRepairData(data) {
  return request({
    url: `/cdaily/jcwTempRepair/saveOrUpdateData`,
    method: 'post',
    data
  })
}

// 删除接触网临时计划信息
export function deleteJcwTempRepairData(id) {
  return request({
    url: `/cdaily/jcwTempRepair/${id}`,
    method: 'delete'
  })
}

// 调度安全生产一键上报
export function onekeyReportData(data) {
  return request({
    url: `/cdaily/fillInMainRecord/submitAll`,
    method: 'post',
    data
  })
}

// 根据计划号、计划日期获取天窗数据
export function initSkyLightPlan(params) {
  return request({
    url: '/jjxt/bureauImportRecord/getInfo',
    method: 'get',
    params
  })
}

// 获取计划号列表
export function getPlanCode(params) {
  return request({
    url: '/jjxt/bureauImportRecord/getPlanCode',
    method: 'get',
    params
  })
}

